package com.xm.service;

import com.xm.dao.orderDao;
import com.xm.pojo.order;
import com.xm.pojo.product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class orderServiceImpl implements orderService{

    @Autowired
    private orderDao orderDao;

    @Override
    public List<order> orderInfoAll(int userId) {
        return orderDao.orderInfoAll(userId);
    }

    @Override
    public List<order> orderInfo(int userId, int status) {
        return orderDao.orderInfo(userId,status);
    }

    @Override
    public List<order> order(String orderNum) {
        return orderDao.order(orderNum);
    }


    @Override
    public List<order> paymentFlag(int userId) {
        return orderDao.paymentFlag(userId);
    }

    @Override
    public boolean delOrderFalse(String orderNum) {
        return orderDao.delOrderFalse(orderNum);
    }

    @Override
    public boolean delOrderTrue(String orderNum) {
        return orderDao.delOrderTrue(orderNum);
    }

    @Override
    public boolean updateOrder(int paymentFlag, String orderNum) {
        return orderDao.updateOrder(paymentFlag,orderNum);
    }

    @Override
    public boolean updateStatus(int status, String orderNum) {
        return orderDao.updateStatus(status,orderNum);
    }

    @Override
    public boolean updateOrderUser(order order) {
        return orderDao.updateOrderUser(order);
    }
    @Override
    public List<order> carIdInfo(int[] ids) {
        return orderDao.carIdInfo(ids);
    }

    @Override
    public boolean addInfo(order order) {
        return orderDao.addInfo(order);
    }

    @Override
    public boolean addItem(order order) {
        return orderDao.addItem(order);
    }

    @Override
    public boolean addHistory(order order) {
        return orderDao.addHistory(order);
    }
}
